package com.example.musicplayer.service;

import com.example.musicplayer.bean.Music;
import com.example.musicplayer.service.IMusicServiceCallback;

interface IMusicService
{
    void open(String path);
    boolean isPlaying();
    void pause();
    void prev();
    void next();
    void stop();
    void play();
    long duration();
    long position();
    void seek(long position);

    void playList(in long[] ids, int position);
    long[] getPlayingList();
    void playMusic(in Music music);
    void playMusics(in Music[] musics);

    void setCallback(IMusicServiceCallback cb);

    /**
     * level: 
     *  0: disable log
     *  1: Log.v()
     *  2: Log.d()
     *  3: Log.i()
     *  4: Log.w()
     *  5: Log.e()
     */
    oneway void setLogging(int level);
}